<ul *ngIf="param.apiKey">
    <!-- 整个请求数据 -->
    <li class="param-item-content expandable">
        <i class="material-icons icon expand-icon" (click)="expand(param)" [class.rotate-90]="param.expanding">play_arrow</i>
        <span class="param-name">{{'[ //参数列表'}}</span>
        <ul class="param-tree-node" *ngIf="param.expanding && param.params">
            <app-invoke-request-param-list *ngFor="let item of param.params" [param]="item"></app-invoke-request-param-list>
        </ul>
        <div class="tips ml-2" *ngIf="param.expanding && !param.params">// 当前接口没有参数</div>
        <span class="param-name param-name-end">{{']'}}</span>
    </li>
</ul>
<li class="param-item-content expandable" *ngIf="param.type===0">
    <!-- 基本类型 -->
    <i class="material-icons" [class.available]="level==0 || param.available" (click)="param.available = !param.available">check_box</i>
    <ng-container *ngIf="param.mapKey">
        <span class="param-name">{{param.mapKey}}</span>:
    </ng-container>
    <ng-container *ngIf="param.key && level>0">
        <span class="param-name">{{param.key}}</span>:
    </ng-container>
    <input class="input" [(ngModel)]="param.value" *ngIf="!param.multiLine">
    <textarea class="input" [(ngModel)]="param.value" *ngIf="param.multiLine" rows="10" cols="80"></textarea>
    <i class="material-icons" *ngIf="param.typeName=='java.lang.String'" [class.available]="param.multiLine" title="切换多行编辑" (click)="param.multiLine=!param.multiLine">settings_overscan</i>
    <span class="tips">//<ng-container *ngIf="level==0 && param.key">{{param.key}} </ng-container>@{{param.typeName | simpleEntityName}}<ng-container *ngIf="param.comment"> #{{param.comment}}</ng-container></span>
    <ng-container *ngIf="parent">
        <i class="material-icons icon" (click)="delItem(param)">remove_circle</i>
    </ng-container>
</li>
<li class="param-item-content expand-icon expandable" *ngIf="param.type===1">
    <!-- 枚举类型 -->
    <i class="material-icons" [class.available]="level==0 || param.available" (click)="param.available = !param.available">check_box</i>
    <ng-container *ngIf="param.mapKey">
        <span class="param-name">{{param.mapKey}}</span>:
    </ng-container>
    <ng-container *ngIf="param.key && level>0">
        <span class="param-name">{{param.key}}</span>:
    </ng-container>
    <select [(ngModel)]="param.value">
        <option *ngFor="let enumItem of entity.fields">{{enumItem.name}}</option>
    </select>
    <span class="tips">//<ng-container *ngIf="level==0 && param.key">{{param.key}} </ng-container>@{{param.typeName | simpleEntityName}}<ng-container *ngIf="param.comment"> #{{param.comment}}</ng-container></span>
    <ng-container *ngIf="parent">
        <i class="material-icons icon" (click)="delItem(param)">remove_circle</i>
        <i class="material-icons icon" (click)="moveDown(param)" *ngIf="listCount && listIndex + 1 != listCount" title="下移">arrow_downward</i>
        <i class="material-icons icon" (click)="moveUp(param)" *ngIf="listIndex && listIndex > 0" title="上移">arrow_upward</i>
    </ng-container>
</li>
<li class="param-item-content expandable" *ngIf="param.type===2">
    <!-- 实体类 -->
    <i class="material-icons icon expand-icon" (click)="expand(param)" [class.rotate-90]="param.expanding">play_arrow</i>
    <ng-container *ngIf="param.mapKey">
        <span class="param-name">{{param.mapKey}}</span>:
    </ng-container>
    <span class="param-name">{{'{'}}</span>
    <span class="tips">//{{param.key}} @{{param.typeName | simpleEntityName}}<ng-container *ngIf="param.comment"> #{{param.comment}}</ng-container></span>
    <ng-container *ngIf="parent">
        <i class="material-icons icon" (click)="delItem(param)">remove_circle</i>
        <i class="material-icons icon" (click)="moveDown(param)" *ngIf="listCount && listIndex + 1 != listCount" title="下移">arrow_downward</i>
        <i class="material-icons icon" (click)="moveUp(param)" *ngIf="listIndex && listIndex > 0" title="上移">arrow_upward</i>
    </ng-container>
    <ul class="param-tree-node" *ngIf="param.expanding">
        <ng-container *ngFor="let item of param.value;">
            <app-invoke-request-param-list [param]="item" [level]="level + 1"></app-invoke-request-param-list>
        </ng-container>
    </ul>
    <span class="param-name param-name-end">{{'}'}}</span>
</li>
<li class="param-item-content expandable" *ngIf="param.type===3 || param.type===5">
    <!-- Collection -->
    <i class="material-icons icon expand-icon" (click)="expand(param)" [class.rotate-90]="param.expanding">play_arrow</i>
    <ng-container *ngIf="param.mapKey">
        <span class="param-name">{{param.mapKey}}</span>:
    </ng-container>
    <span class="param-name">{{'['}}</span>
    <span class="tips">//{{param.key}} @{{param.typeName | simpleEntityName}}<ng-container *ngIf="param.comment"> #{{param.comment}}</ng-container></span>
    <i class="material-icons icon" *ngIf="param.expanding" (click)="addItem()">add_circle</i>
    <ul class="param-tree-node" *ngIf="param.expanding">
        <app-invoke-request-param-list *ngFor="let item of param.value; index as index;" [param]="item" [level]="level + 1" [parent]="param" [listIndex]="index" [listCount]="param.value.length"></app-invoke-request-param-list>
    </ul>
    <div class="tips ml-2" *ngIf="!param.value && param.expanding">// 当前列表为空，请先添加</div>
    <span class="param-name param-name-end">{{']'}}</span>
</li>
<li class="param-item-content expandable" *ngIf="param.type===4">
    <!-- Map -->
    <i class="material-icons icon expand-icon" (click)="expand(param)" [class.rotate-90]="param.expanding">play_arrow</i>
    <ng-container *ngIf="param.mapKey">
        <span class="param-name">{{param.mapKey}}</span>:
    </ng-container>
    <span class="param-name">{{'{'}}</span>
    <span class="tips">//{{param.key}} @{{param.typeName | simpleEntityName}}<ng-container *ngIf="param.comment"> #{{param.comment}}</ng-container></span>
    <input class="input ml-1" [(ngModel)]="mapKey" placeholder="请输入键值" *ngIf="param.expanding"> <i class="material-icons icon" *ngIf="param.expanding" (click)="addMapItem()">add_circle</i>
    <ul class="param-tree-node" *ngIf="param.expanding">
        <app-invoke-request-param-list *ngFor="let item of param.value" [param]="item" [level]="level + 1" [parent]="param"></app-invoke-request-param-list>
    </ul>
    <div class="tips ml-2" *ngIf="!param.value && param.expanding">// 当前Map为空，请先添加！(目前仅支持字符key)</div>
    <span class="param-name param-name-end">{{'}'}}</span>
</li>
